gary
Files:UMDCTF{I_d0nt_th1nk_bulby_!s_th3_n3xt_3ul3r_tbh}p = 6596997572802685744626960256235787019476434707654191935397530271983648431547
d = open("output (36).txt").read()
d = d.split("\n")
d.pop(0)
d.pop(-1)
flag = ""
for x in d:
gx, gy = x.split(", ")
gx, gy = int(gx), int(gy)
if (gx*gy)%p == 1:
flag += "1"
else:
flag += "0"
flag = int(flag,2)
from Crypto.Util.number import long_to_bytes as l2b
print(l2b(flag))